package com.loobot.album.config.secure.gateway;


/**
 * @author: Ike.Fan
 * @date: 2019/3/5.
 */
public class PartnerThreadLocal {
    private PartnerThreadLocal(){

    }
    /**
     * 仅当前线程有效的，用于判断是否有loobot授权帐号的合法访问
     */
    private static final ThreadLocal<LoobotAccount> partnerDtoThreadLocal = new ThreadLocal<>();

    public static void set(LoobotAccount partnerDto){
        partnerDtoThreadLocal.set(partnerDto);
    }

    public static LoobotAccount get(){
        return partnerDtoThreadLocal.get();
    }
}
